import { Request, Response } from 'express';

export default {
  'GET /_api/my-mo/getList': getList,
};


function getList(_req: Request, res: Response) {
  const data = {
    number: 3300,
    name: '20-穿梭',
    checkbox: false,
    list: [
      {
        checked: false,
        status: 'new',
        numberCode: 'T2019120102010021',
        name: "A622F_319_4",
        code: "MO2019210000012",
        date: '2020-02-21',
        number: 500,
      },
      {
        checked: false,
        status: 'new',
        numberCode: 'T2019120102010021',
        name: "A622F_319_4",
        code: "MO2019210000012",
        date: '2020-02-21',
        number: 500,
      },
      {
        checked: false,
        status: 'new',
        numberCode: 'T2019120102010021',
        name: "A622F_319_4",
        code: "MO2019210000012",
        date: '2020-02-21',
        number: 500,
      },
      {
        checked: false,
        status: 'new',
        numberCode: 'T2019120102010021',
        name: "A622F_319_4",
        code: "MO2019210000012",
        date: '2020-02-21',
        number: 500,
      },
    ],
  };

  const list = [] as any;

  for(let i =0; i<3; i++ ){
    list.push(JSON.parse(JSON.stringify(data)));
  }
  list[1].list.splice(1);

  return res.json(list);
}
